home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / mflzt.exe / lha / MFL_QREF.DOC < prev    next >
Text File  |  1989-11-26  |  27KB  |  982 lines

  1.  
  2.              MICROFIRM FUNCTION LIBRARY QUICK REFERENCE GUIDE
  3.  
  4.             Copyright 1988-89 by Robert B. Stout dba MicroFirm
  5.  
  6.  
  7. *=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*
  8. *  MFLFILES.H                                                          *
  9. *=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*
  10.  
  11.  
  12. **********************************************************
  13. *  Recursive find first/next functions                   *
  14. **********************************************************
  15.  
  16. struct FIND *  rfind_1st(char *, int, struct FIND *);
  17. Recursive find first matching file
  18.  
  19. struct FIND *  rfind_nxt(struct FIND *, LOGICAL);
  20. Recursive find next matching file
  21.  
  22. #define _dos_findfirst(path,attrib,ffblk)
  23. Find first matching file
  24.  
  25. #define _dos_findnext(ffblk)
  26. Find next matching file
  27.  
  28. **********************************************************
  29. *  Check for the existance of a file                     *
  30. **********************************************************
  31.  
  32. int exists(char *);
  33. See if a file exists
  34.  
  35. int access(char *, int);
  36. Check if a file exists
  37.              
  38. **********************************************************
  39. *  Change/verify disk drives or directories              *
  40. **********************************************************
  41.  
  42. int chdrv(char);
  43. Change disk drives
  44.  
  45. LOGICAL drvalid(char);
  46. See if a drive is valid
  47.  
  48. char getdrv(void);
  49. Return default drive
  50.  
  51. int pushdir(char *);
  52. Save current directory, then go to a new one
  53.  
  54. int popdir(void);
  55. Return to previous directory
  56.  
  57. **********************************************************
  58. *  File operations using FCB functions                   *
  59. **********************************************************
  60.  
  61. int FCB_creat(char *, int);
  62. Create a file using a file control block
  63.  
  64. int FCB_kill(char *, int);
  65. Delete a file using a file control block
  66.  
  67. struct XFCB *  FCB_open(char *, int);
  68. Open a file using a file control block
  69.  
  70. int FCB_close(struct XFCB *);
  71. Close a file using a file control block
  72.  
  73. int FCB_reads(struct XFCB *, void *);
  74. Sequential read using a file control block
  75.  
  76. int FCB_writes(struct XFCB *, void *);
  77. Sequential write using a file control block
  78.  
  79. int FCB_readr(struct XFCB *, void *, long);
  80. Random read using a file control block
  81.  
  82. int FCB_writer(struct XFCB *, void *, long);
  83. Random write using a file control block
  84.  
  85. **********************************************************
  86. *  Manipulate volume labels                              *
  87. **********************************************************
  88.  
  89. char *flretvol(char);
  90. Return volume label for a specified drive
  91.  
  92. int flremvol(char);
  93. Remove volume label for a specified drive
  94.  
  95. int flsetvol(char, char *);
  96. Set volume label for a specified drive
  97.  
  98. **********************************************************
  99. *  Delete files using FCB's - very fast with wildcards!  *
  100. **********************************************************
  101.  
  102. int del_files(char *, char *);
  103. Delete all files matching a spec in a given directory
  104.  
  105. **********************************************************
  106. *  Get/set file attributes                               *
  107. **********************************************************
  108.  
  109. int flsetatr(char *, int);
  110. Set a file's attributes
  111.  
  112. int flgetatr(char *);
  113. Get a file's attributes
  114.  
  115. #define chmod(f,a)
  116. Set a file's attributes
  117.  
  118. **********************************************************
  119. *  Set file translation mode                             *
  120. **********************************************************
  121.  
  122. int setmode(int, int);
  123. Set mode of a file w/ file handle
  124.  
  125. int setfmode(FILE *, int);
  126. Set mode of a file w/ file descriptor
  127.  
  128. **********************************************************
  129. *  Directory operations using file-type functions        *
  130. **********************************************************
  131.  
  132. DOS_DIR * opendir(char *);
  133. Open a directory for reading
  134.  
  135. void closedir(DOS_DIR *);
  136. Close a directory
  137.  
  138. struct FIND * readdir(DOS_DIR *);
  139. Read directory entries
  140.  
  141. int dirmask(struct FIND *, char *, char *, unsigned, unsigned);
  142. Validates directory entries based on name and attributes
  143.  
  144. **********************************************************
  145. *  ANSI functions                                        *
  146. **********************************************************
  147.  
  148. int dup(int);
  149. Duplicate a file handle
  150.  
  151. int dup2(int, int);
  152. Force two file handles to the same file
  153.  
  154. **********************************************************
  155. *  Stream functions for installable stream filters.      *
  156. **********************************************************
  157.  
  158. SFILE * sfopen(char *, char *);
  159. Open a file as a filterable stream
  160.  
  161. SFILE * scopen(int (*)(), int (*)(), char *);
  162. Open a channel as a filterable stream
  163.  
  164. int sclose(SFILE *);
  165. Close an open stream
  166.  
  167. int sfputc(int, SFILE *);
  168. Put a character to a stream
  169.  
  170. int sfputs(char *, SFILE *);
  171. Put a string to a stream
  172.  
  173. size_t sfwrite(void *, size_t, size_t, SFILE *);
  174. Write a buffer to a stream
  175.  
  176. int sfgetc(SFILE *);
  177. Get a character from a stream
  178.  
  179. char  * sfgets(void *, int, SFILE *);
  180. Get a string from a stream
  181.  
  182. size_t sfread(void *, size_t, size_t, SFILE *);
  183. Read a buffer from a stream
  184.  
  185. LOGICAL sfinstall(SFILE *, SFILTER *);
  186. Install a stream filter
  187.  
  188. **********************************************************
  189. *  Simple stream filters                                 *
  190. **********************************************************
  191.  
  192. extern SFILTER    ucase_filt,
  193. Forces a stream to upper case
  194.  
  195. extern SFILTER    lcase_filt;
  196. Forces a stream to lower case
  197.  
  198. **********************************************************
  199. *  Stream encryption function                            *
  200. **********************************************************
  201.  
  202. int crypt_install(SFILE *, char *, int);
  203. Installs an encryption/decryption filter
  204.  
  205. **********************************************************
  206. *  Stream compression/expansion functions                *
  207. **********************************************************
  208.  
  209. int ncode_install(SFILE *);
  210. Installs an RLE encoder as a stream filter
  211.  
  212. int dcode_install(SFILE *);
  213. Installs an RLE decoder as a stream filter
  214.  
  215. **********************************************************
  216. *  File truncation functions                             *
  217. **********************************************************
  218.  
  219. int trunc(int, long);
  220. Truncate an open'ed file
  221.  
  222. int ftrunc(FILE *, long);
  223. Truncate an fopen'ed file
  224.  
  225. int truncate(char *, long);
  226. Truncate a named file
  227.  
  228. **********************************************************
  229. *  Filename parsing functions                            *
  230. **********************************************************
  231.  
  232. int fnsplit(char *,char *,char *,char *,char *,char *,char *);
  233. Split a string into drive/path/file/ext
  234.  
  235. char * fnmerge(char *,char *,char *,char *,char *,char *,char *);
  236. Merge drive/path/file/ext into a file string
  237.  
  238. int has_wild(char *);
  239. Checks a string for DOS wildcards
  240.  
  241. void basename(char *, char *, char *);
  242. Split a string into path and/or filename
  243.  
  244. int wildname(char *, char *, int);
  245. Matches filenames against a pattern
  246.  
  247. **********************************************************
  248. *  Normalize file names                                  *
  249. **********************************************************
  250.  
  251. int flnorm(char *, char *);
  252. Normalize a filename
  253.  
  254. char * fln_fix(char *);
  255. Remove "dot" directories from pathnames
  256.  
  257. char * unix2dos(char *);
  258. Converts Unix-style paths to DOS-style
  259.  
  260. **********************************************************
  261. *  Open files using a path specification                 *
  262. **********************************************************
  263.  
  264. FILE * fopenp(char *, char *);
  265. fopen a file in the PATH
  266.  
  267. FILE * fopeng(char *, char *, char *);
  268. fopend/fopenp combination
  269.  
  270. FILE * fopend(char *, char *, char *);
  271. Fopen a file in an environment variable
  272.  
  273. int openp(char *, int);
  274. Open a file in the PATH
  275.  
  276. int opend(char *, int, char *);
  277. Open a file in the PATH
  278.  
  279. int openg(char *, int, char *);
  280. opend/openp combination
  281.  
  282. int getpath(char *);
  283. Retrieve the PATH variable a